Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

forwarded

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

forwarded

Parse HTTP X-Forwarded-For header

  • 0.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
30M
increased by0.53%
Maintainers
1
Weekly downloads
 
Created

What is forwarded?

The 'forwarded' npm package is designed to parse the 'X-Forwarded-For' header from an HTTP request, which is a standard header for identifying the originating IP address of a client connecting to a web server through an HTTP proxy or load balancer. This package extracts the IP addresses listed in the header and provides them in an array format, making it easier to handle cases where there are multiple proxies in use.

What are forwarded's main functionalities?

Parse X-Forwarded-For header

This feature allows you to parse the 'X-Forwarded-For' header from an HTTP request object and returns an array of IP addresses that were added by each proxy.

const forwarded = require('forwarded');
const req = { headers: { 'x-forwarded-for': '192.0.2.60, 198.51.100.17' } };
const ips = forwarded(req);
console.log(ips); // ['192.0.2.60', '198.51.100.17']

Other packages similar to forwarded

Keywords

FAQs

Package last updated on 31 May 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc